﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataService.Office.Word
{
    public class XmlToWordDataDTO
    {
        /// <summary>
        /// 向这个标题下追加内容
        /// </summary>
        public string OptionTitle { get; set; }
        /// <summary>
        /// 目标标题级别
        /// </summary>
        public int OptionTitleLvl { get; set; }
        /// <summary>
        /// 需要插入到word的 第一层 数据
        /// </summary>
        public List<FirstWordTextData> FirstWordTextDatas { get; set; }
    }
    public class BaseWordData
    {
        /// <summary>
        /// 需要插入的标题等级
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 新插入的标题
        /// </summary>
        public string NewWordTitle { get; set; }
        /// <summary>
        /// 正文文本
        /// </summary>
        public string ContentText { get; set; }

        public string FirstConfigName { get; set; }
        public string SecondConfigName { get; set; }
        public string ThirdConfigName { get; set; }
        public decimal Width { get; set; }
        public decimal Height { get; set; }
    }

    public class FirstWordTextData : BaseWordData
    {
        public DataTable WordTableData { get; set; }
        /// <summary>
        /// 横向合并
        /// </summary>
        public List<TableMergeCellDTO> CellsMerge { get; set; }

        public List<TableTextStyle> TableStyles { get; set; }
        /// <summary>
        /// 纵向合并
        /// </summary>
        public List<TableVerticalMergeDTO> RowsMerge { get; set; }
        /// <summary>
        /// 第一层标题下的子集
        /// </summary>
        public List<SecondWordTextData> SecondWordTextDatas { get; set; }

    }
    public class SecondWordTextData : BaseWordData
    {
        public Guid PkId { get; set; }
        /// <summary>
        /// 需要插入到word中的图片
        /// </summary>
        public List<string> Imgs { get; set; }
        public decimal Width { get; set; }
        public decimal Height { get; set; }
        /// <summary>
        /// 第二层标题下的子集
        /// </summary>
        public List<ThirdWordTextData> ThirdWordTextDatas { get; set; }

    }
    public class ThirdWordTextData : BaseWordData
    {
        public Guid PkId { get; set; }
        /// <summary>
        /// 需要插入到word中的图片
        /// </summary>
        public List<string> Imgs { get; set; }
        
        //最小改动，增加一个实体列表集合
        public List<ImageInfoDTO> ImageInfoDTOs { get; set; } = new List<ImageInfoDTO>();
        /// <summary>
        /// 第三层标题下的子集
        /// </summary>
        public List<FourthWordTextData> FourthWordTextDatas { get; set; } = new List<FourthWordTextData>();

    }
    public class FourthWordTextData : BaseWordData
    {
        /// <summary>
        /// 需要插入到word中的图片
        /// </summary>
        public List<string> Imgs { get; set; }
    }
    public class ImageInfoDTO
    {
        public string ConfigName { get; set; }
        public decimal Width { get; set; }
        public decimal Height { get; set; }
        public string ImagePath { get; set; }
    }

}
